home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ WinXP Start Menu 5.xpl < prev    next >
Text File  |  2003-11-19  |  4KB  |  151 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="9"
  3. "COUNT"="1"
  4. "UIPATH 1"="Appearance\Start menu\Windows XP\New Start Menu"
  5. "NAME"="Cascaded System Items"
  6. "VERSION"="2.00"
  7. "OSVERSION"="0000011"
  8. "LANGUAGE"="VBScript"
  9. "DESCRIPTION 1"="Use this plug-in to show some of the "special" folder of Window in cascading menu so you can easily access them. "
  10. "DESCRIPTION 2"="Cascade means: make the items behave like menus with submenus instead of just opening the related folder. "
  11. "DESCRIPTION 3"="Please note: "Administration" and "Favorites" are auto-cascading; means when they are visible, they will automatically cascaded."
  12. "AUTHOR"="Xteq Systems"
  13. "CONTACTURL"="http://www.xteq.com"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"=" "
  16.  
  17.  
  18. sP2="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\"
  19.  
  20. sV1=sP2 & "Start_ShowPrinters"
  21. sV2=sP2 & "Start_ShowControlPanel"
  22. sV3=sP2 & "Start_ShowMyDocs"
  23. sV4=sP2 & "Start_ShowMyPics"
  24. sV5=sP2 & "Start_ShowMyMusic"
  25. sV6=sP2 & "Start_ShowMyComputer"
  26. sV7=sP2 & "Start_ShowRecentDocs"
  27. sV8=sP2 & "Start_ShowNetConn"
  28.  
  29.  
  30.  
  31. SUB Plugin_Initialize
  32.  Call SetUIElement(1,"Show cascading 'Printers' in Start Menu")
  33.  Call ReadIt_3(1,sV1)
  34.  
  35.  Call SetUIElement(2,"Show cascading 'Control Panel' in Start Menu")
  36.  Call ReadIt_3(2,sV2)
  37.  
  38.  Call SetUIElement(3,"Show cascading 'My Documents' in Start Menu")
  39.  Call ReadIt_3(3,sV3)
  40.  
  41.  Call SetUIElement(4,"Show cascading 'My Pictures' in Start Menu")
  42.  Call ReadIt_3(4,sV4)
  43.  
  44.  Call SetUIElement(5,"Show cascading 'My Music' in Start Menu")
  45.  Call ReadIt_3(5,sV5)
  46.  
  47.  Call SetUIElement(6,"Show cascading 'My Computer' in Start Menu")
  48.  Call ReadIt_3(6,sV6)
  49.  
  50.  Call SetUIElement(7,"Show cascading 'Recent Documents' in Start Menu")
  51.  Call ReadIt_3(7,sV7)
  52.  
  53.  Call SetUIElement(8,"Show cascading 'Network Connections' in Start Menu")
  54.  Call ReadIt_3(8,sV8)
  55.  
  56. END SUB
  57.  
  58. 'Called when the Plugin should apply the changes
  59. SUB Plugin_Apply(ElementIndex,ElementSubIndex) 
  60.  Call WriteIt_3(1,sV1)
  61.  Call WriteIt_3(2,sV2)
  62.  Call WriteIt_3(3,sV3)
  63.  Call WriteIt_3(4,sV4)
  64.  Call WriteIt_3(5,sV5)
  65.  Call WriteIt_3(6,sV6)
  66.  Call WriteIt_3(7,sV7)
  67.  Call WriteIt_3(8,sV8)
  68.  
  69.  Call IndicateSettingChange()
  70.  Call Logoff()
  71. END SUB
  72.  
  73. Sub ReadIt(ITM,PATH1)
  74.  if RegValueExists(PATH1)=false then 'setting available?
  75.     'no setting -> item visible
  76.     Call SetUIElementEx(ITM,true)
  77.  else
  78.     i=RegReadValue(PATH1)
  79.     if i=0 then 
  80.        Call SetUIElementEx(ITM,true)
  81.     end if
  82.  end if
  83. End Sub
  84.  
  85. Sub ReadIt_2(ITM,PATH1)
  86.  if RegValueExists(PATH1)=false then 'setting available?
  87.     'no setting -> item not visible
  88.     Call SetUIElementEx(ITM,false)
  89.  else
  90.     i=RegReadValue(PATH1)
  91.     if i>0 then 
  92.        Call SetUIElementEx(ITM,true)  
  93.     end if
  94.  end if
  95. End Sub
  96.  
  97. Sub ReadIt_3(ITM,PATH1)
  98.  if RegValueExists(PATH1)=false then 'setting available?
  99.     'no setting -> item not visible
  100.     Call SetUIElementEx(ITM,false)
  101.  else
  102.     i=RegReadValue(PATH1)
  103.     if i>1 then 
  104.        Call SetUIElementEx(ITM,true)  
  105.     end if
  106.  end if
  107. End Sub
  108.  
  109.  
  110. Sub WriteIt(ITM,PATH1)
  111.  b=GetUIElementEx(ITM)
  112.  if b=true then
  113.  
  114.     s=RegReadValue(PATH1)
  115.     if IsEmpty(s)=false then
  116.        Call RegDeleteValue(PATH1)
  117.     end if
  118.  
  119.  else
  120.     Call RegWriteValue(PATH1,1,2)
  121.  end if
  122. End Sub
  123.  
  124. Sub WriteIt_2(ITM,PATH1)
  125.  b=GetUIElementEx(ITM)
  126.  if b=true then
  127.     i=RegReadValue(PATH1)
  128.     if i<1 then
  129.        Call RegWriteValue(PATH1,1,2)
  130.     end if
  131.  else
  132.     Call RegWriteValue(PATH1,0,2)
  133.  end if
  134. End Sub
  135.  
  136. Sub WriteIt_3(ITM,PATH1)
  137.  b=GetUIElementEx(ITM)
  138.  if b=true then
  139.     Call RegWriteValue(PATH1,2,2)
  140.  else
  141.     i=RegReadValue(PATH1)
  142.     if i=2 then
  143.        Call RegWriteValue(PATH1,1,2)
  144.     end if
  145.  end if
  146. End Sub
  147.  
  148.  
  149. SUB Plugin_Terminate
  150. END SUB
  151.